//
// Backend.cs
//
// Copyright (C) 2008 Lukas Lipka <lukaslipka@gmail.com>
//

using System;
using System.Collections.Generic;

using Dashboard;

namespace Dashboard.Engine {

	public abstract class Backend {

		private List<Rule> rules = new List<Rule> ();

		public Backend ()
		{
			Engine.BackendManager.Register(this); 
		}

		protected void Register (string name, QueryRule query_rule)
		{
			rules.Add (new Rule (name, query_rule));
		}

		public IEnumerable<Rule> Rules {
			get { return rules; }
		}
	}
}
